﻿using PowerHub.MES.Entities.BasicData;
using PowerHub.MES.Entities.Crew;
using PowerHub.MES.Entities.ProcessRoute;
using PowerHub.MES.Entities.ProductPlanning;
using PowerHub.MES.Entities.Shopfloor;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;

namespace PowerHub.MES.Entities.Production;

/// <summary>
/// 生产任务
/// </summary>
[Table("Production_ProductionTask")]
public partial class Production_ProductionTask : BaseEntity
{
    /// <summary>
    /// 任务编号
    /// </summary>
    public string? ProductionTaskNO { get; set; }

    /// <summary>
    /// 任务名称
    /// </summary>
    public string? ProductionTaskName { get; set; }

    /// <summary>
    /// 排班计划id
    /// </summary>
    public string? SchedulingPlanId { get; set; }
    /// <summary>
    /// 原料id
    /// </summary>
    public string? MaterialId { get; set; }

    /// <summary>
    /// 工单id
    /// </summary>
    public string? WorkOrderId { get; set; }
    /// <summary>
    /// 工作站id
    /// </summary>
    public string? WorkStationId { get; set; }
    /// <summary>
    /// 用户id
    /// </summary>
    public string? UserinfoId { get; set; }
    /// <summary>
    /// 工序id
    /// </summary>
    public string? ProcessId { get; set; }
    /// <summary>
    /// 暂停原因
    /// </summary>
    public string? SuspendReason { get; set; }
    /// <summary>
    /// 暂停时间
    /// </summary>
    public DateTime? PauseTime { get; set; }
    /// <summary>
    /// 报工时间
    /// </summary>
    public DateTime? ReportingTime { get; set; }
    /// <summary>
    /// 开始生产时间
    /// </summary>
    public DateTime? StartTime { get; set; }
    /// <summary>
    /// 报工时间
    /// </summary>
    public string? ReportingUserId { get; set; }
    /// <summary>
    /// 状态 选项：1=生产中，2，生产完成，3，已作废，4，暂停
    /// </summary>
    public int? Status { get; set; }

    /// <summary>
    /// 订单数量
    /// </summary>
    public int? ProductionQuantity { get; set; }
    /// <summary>
    /// 排产数量
    /// </summary>
    public int? SchedulingQuantity { get; set; }
    /// <summary>
    /// 排班计划明细id
    /// </summary>
    public string? SchedulingPlanDetialId { get; set; }

    public virtual Crew_SchedulingPlan? SchedulingPlan { get; set; }
    public virtual Production_WorkOrder? WorkOrder { get; set; }
    public virtual Shopfloor_WorkStation? WorkStation { get; set; }
    public virtual BasicData_Userinfo?  Userinfo { get; set; }
    public virtual ProcessRoute_Process?  Process { get; set; }
}
